var express = require('express');
var router = express.Router();
const  User =require('../models/admin_bean')
const userController = require('../controllers/admin_controller')
const token=require('../utils/checkToken')
/* GET users listing. */



//登录请求

router.post("/login", (req, res) => {
    console.log(req.body.username, req.body.password);

    userController.doLogin(
        new User.User(req.body.username, req.body.password),
        (ret) => {
            res.json(ret);
        },
        (err) => res.json(err)
    );
});
    


    



module.exports = router;
